package Function;
import Function.ShoppingCart;
import Sale.Window;

public class Buy {
    public static void buy(){
        int totalQuantity = 0;
        for (int quantity : ShoppingCart.goods.values()) {
            totalQuantity += quantity;
        }
        System.out.println("购物车中的最终商品总数为：" + totalQuantity);
        Window.window(totalQuantity);
    }
}
